package a2dp.vol.chat;

public class ServiceItem {

	//private Integer key;
	private Integer key;
	private String address;
	private Integer port;
	private String sname;
	private Integer sasl;
	private Integer tls;
	private Integer reconnect;
	private String user;
	private String pwd;
	/**
	 * @return the key
	 */
	public Integer getKey() {
		return key;
	}
	/**
	 * @param key the key to set
	 */
	public void setKey(Integer key) {
		this.key = key;
	}
	/**
	 * @return the address
	 */
	public String getAddress() {
		return address;
	}
	/**
	 * @param address the address to set
	 */
	public void setAddress(String address) {
		this.address = address;
	}
	/**
	 * @return the port
	 */
	public Integer getPort() {
		if(port == null || port == 0)return 433;
		else return port;
	}
	/**
	 * @param port the port to set
	 */
	public void setPort(Integer port) {
		if(port == null || port == 0) port = 433;
		this.port = port;
	}
	/**
	 * @return the sname
	 */
	public String getSname() {
		return sname;
	}
	/**
	 * @param sname the sname to set
	 */
	public void setSname(String sname) {
		this.sname = sname;
	}
	/**
	 * @return the sasl
	 */
	public Integer getSasl() {
		return sasl;
	}
	/**
	 * @return the sasl
	 */
	public boolean bgetSasl() {
		if(sasl >=1) return true;
		else return false;
	}
	/**
	 * @param sasl the sasl to set
	 */
	public void setSasl(Integer sasl) {
		this.sasl = sasl;
	}
	/**
	 * @param sasl the sasl to set
	 */
	public void setSasl(boolean sasl) {
		if(sasl) this.sasl = 1;
		else this.sasl = 0;
	}
	/**
	 * @return the tls
	 */
	public Integer getTls() {
		return tls;
	}
	/**
	 * @return the tls
	 */
	public boolean bgetTls() {
		if(tls >=1)return true;
		else return false;
	}
	/**
	 * @param tls the tls to set
	 */
	public void setTls(Integer tls) {
		this.tls = tls;
	}
	/**
	 * @param tls the tls to set
	 */
	public void setTls(boolean tls) {
		if(tls) this.tls = 1;
		else this.tls = 0;
	}
	/**
	 * @return the reconnect
	 */
	public Integer getReconnect() {
		return reconnect;
	}
	/**
	 * @return the reconnect
	 */
	public boolean bgetReconnect() {
		if(reconnect >= 1)return true;
		else return false;
	}
	/**
	 * @param reconnect the reconnect to set
	 */
	public void setReconnect(Integer reconnect) {
		this.reconnect = reconnect;
	}
	/**
	 * @param reconnect the reconnect to set
	 */
	public void setReconnect(boolean reconnect) {
		if(reconnect)this.reconnect = 1;
		else this.reconnect = 0;
	}
	/**
	 * @return the user
	 */
	public String getUser() {
		return user;
	}
	/**
	 * @param user the user to set
	 */
	public void setUser(String user) {
		this.user = user;
	}
	/**
	 * @return the pwd
	 */
	public String getPwd() {
		return pwd;
	}
	/**
	 * @param pwd the pwd to set
	 */
	public void setPwd(String pwd) {
		this.pwd = pwd;
	}
}
